package com.fzrskj.cloud.free.user.utils.agent;

import com.fzrskj.cloud.free.sys.bean.SysNotifyTemplate;
import com.fzrskj.cloud.free.sys.dao.SysNotifyTemplateDao;

import java.util.List;

/**
 * InitDataOfNoticeTemplateHelper.
 *
 * @author zj.
 *         Created on 2019/8/29 0029.
 */
public class InitDataOfNoticeTemplateHelper {
    /**
     * 初始化代理商通知模板.
     * @param agentId 代理商ID.
     */
    public static void initTemplate(Integer agentId) {
        SysNotifyTemplateDao templateDao = new SysNotifyTemplateDao();
        List<SysNotifyTemplate> templateList= templateDao.queryByAgentId(agentId, 1, 1);
        if (null == templateList || templateList.isEmpty()) {
            templateDao.initAgent(agentId);
        }
    }
}
